import numpy as np

a = np.arange(4)
b = a # 引用传递
# 修改b,a会改变
b[0] = -1
print(a)
print(b)
print(b is a)

# 深拷贝
c = np.copy(a)
# 修改c,a不会改变
c[0] = -2
print(a)
print(c)
print(c is a)